package com.cn.springcloudwechat.mapper.mapper.articleAndMenu;

import com.cn.springcloudwechat.common.mybatis.Page;
import com.cn.springcloudwechat.model.articleAndMenu.YmVideoKnowledge;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 视频知识
 *
 * @author: Administrator
 * @create: 2018/8/1 15:13
 */
@Repository
public interface YmVideoKnowledgeMapper {
    /**
     * 添加视频知识
     *
     * @param record
     * @return
     */
    long insertSelective(YmVideoKnowledge record);

    /**
     * 查询单个视频
     *
     * @param videoId
     * @return
     */
    YmVideoKnowledge selectByPrimaryKey(long videoId);

    /**
     * 更新视频
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(YmVideoKnowledge record);

    /**
     * 查询所有视频
     *
     * @return
     */
    List<YmVideoKnowledge> getAllYmVideoKnowledge();

    /**
     * 根据条件查询视频
     *
     * @param record
     * @param page
     * @return
     */
    List<Object> getAllYmVideoKnowledgeByParameter(@Param("record") YmVideoKnowledge record, Page<Object> page);

    /**
     * 批量更新视频状态
     * @param videoId
     * @param state
     */
    void updateYmVideoKnowledgeState(@Param("list") List<Long> videoId,@Param("state") short state);

}
